package com.sduept.nwld.dataserver.manager.fault.tripping;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.jdbc.DataSourceBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

import javax.sql.DataSource;

/**
 * @Author: qcl
 * @Date: 2020/5/26 10:40
 * @Description: emsOracle数据源配置
 */
@Profile({"!test"})
@Configuration
public class EmsOracleDataSourceConfiguration {
    public EmsOracleDataSourceConfiguration() {
    }

    @Bean(name = {"emsOracleDataSource"})
    @ConfigurationProperties(prefix = "spring.datasource.ems.oracle")
    @Qualifier("emsOracleDataSource")
    public DataSource emsOracleDataSource() {
        return DataSourceBuilder.create().build();
    }
}
